//
//  RACViewController.m
//  RACObjc
//
//  Created by liyang on 06/12/2018.
//  Copyright (c) 2018 liyang. All rights reserved.
//

#import "RACViewController.h"
#import "RACStreamVC.h"
#import "RACSubscriberVC.h"
#import "RACSchedulerVC.h"
#import "RACDisposableVC.h"
#import "RACExampleVC.h"

#import <UIViewController+LYAdd.h>

@interface RACViewController ()

@end

@implementation RACViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    self.title = @"ReactiveCocoa";
}
- (IBAction)one:(UIButton *)sender
{
    RACStreamVC *vc = [[RACStreamVC alloc]init];
    vc.title = [sender titleForState:UIControlStateNormal];
    [self.navigationController pushViewController:vc animated:YES];
}
- (IBAction)two:(UIButton *)sender
{
    RACSubscriberVC *vc = [[RACSubscriberVC alloc]init];
    vc.title = [sender titleForState:UIControlStateNormal];
    [self.navigationController pushViewController:vc animated:YES];
}
- (IBAction)three:(UIButton *)sender
{
    RACSchedulerVC *vc = [[RACSchedulerVC alloc]init];
    vc.title = [sender titleForState:UIControlStateNormal];
    [self.navigationController pushViewController:vc animated:YES];
}
- (IBAction)four:(UIButton *)sender
{
    RACDisposableVC *vc = [[RACDisposableVC alloc]init];
    vc.title = [sender titleForState:UIControlStateNormal];
    [self.navigationController pushViewController:vc animated:YES];
}

- (IBAction)five:(id)sender
{
    RACExampleVC *vc = [RACExampleVC loadFromMainStoryboard];
    vc.title = [sender titleForState:UIControlStateNormal];
    [self.navigationController pushViewController:vc animated:YES];
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
